package Area;

interface Area{
    double calculateArea();
}

class MyCircle implements Area{
    private double r;
    public MyCircle(double x){
        r = x;
    }
    public double calculateArea(){
        return Math.PI*r*r;
    }
}

class MyRectangle implements Area{
    private double width,height;
    public MyRectangle(double w,double h){
        width = w;
        height = h;
    }
    public double calculateArea(){
        return width*height;
    }
}

public class Test {
    public static void main(String[] args)
    {
        MyCircle c = new MyCircle(2);
        System.out.println("Circle's area = "+c.calculateArea());
        MyRectangle r = new MyRectangle(4,5);
        System.out.println("Rectangle's area = "+r.calculateArea());
    }
}
